package com.eveinfo.display.planner;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class TaskPlanner implements Serializable{
	
	private static final long serialVersionUID = 4672003107485352008L;
	
	private final int id;
	private final int skillID;
	private final String skillName;
	private final int skilllevel;
	private final Double trainingTime;
	private final Set<Integer> dependences;
	 
	public TaskPlanner(int id, int skillID, String skillName, int skilllevel, Double trainingTime) {
		this.id = id;
		this.skillID = skillID;
		this.skillName = skillName;
		this.skilllevel = skilllevel;
		this.trainingTime = trainingTime;
		this.dependences = new HashSet<Integer>(2);
	}

	public int getSkillID() {
		return skillID;
	}

	public String getSkillName() {
		return skillName;
	}

	public Double getTrainingTime() {
		return trainingTime;
	}

	public int getSkillLevel() {
		return skilllevel;
	}

	public int getId() {
		return id;
	}
	
	public void addDependence(int id){
		dependences.add(id);
	}
	
	public Set<Integer> getDependences(){
		return dependences;
	}
	
	@Override
	public boolean equals(Object o) {
		if (o instanceof TaskPlanner) {
			TaskPlanner task = (TaskPlanner) o;
			return task.id == this.id;
		}
		return false;
	}
}
